using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using ShopPowerTemplate.Entities;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace ShopPowerTemplate.WcfService
{
	[ServiceContract]
    public partial interface IWebService : IWebServiceBase
    {
        [OperationContract]
        Customer RegisterUserIfNecessary(string accessCode);


        [OperationContract]
        Product FindProduct(int id);

        [OperationContract]
        ProductDetail FindProductDetail(int id);

        [OperationContract]
        List<Category> FindAllCategory();

        [OperationContract]
        Review AddReview(Review review);

        [OperationContract]
        List<Subcategory> CategoryGetSubcategoriesFor(Category category);

        [OperationContract]
        List<Product> SearchProduct(string searchValue);

        [OperationContract]
        List<Option> OptionTypeGetOptionsFor(OptionType optionType);

        [OperationContract]
        List<Review> ProductGetReviewsFor(Product product);

        [OperationContract]
	    bool StockAvailable(Product product, IEnumerable<Option> selectectOptions);

        [OperationContract]
        List<Product> SearchProductCustomByName(Category cat, Subcategory sub);

        [OperationContract]
        List<Product> SearchProductCustomByRating(Category cat, Subcategory sub);

        [OperationContract]
        List<Product> SearchProductCustomByPrice(Category cat, Subcategory sub);

        [OperationContract]
        List<Product> SearchProductCustomByProminentAndName(Category cat, Subcategory sub);

        [OperationContract]
        Image GetProductFirstImage(int productId);

        [OperationContract]
        IEnumerable<Image> GetProductAllImage(int productId);

        [OperationContract]
        IEnumerable<OptionType> GetOptionTypes(int productId);

        [OperationContract]
        decimal GetShippingCost(decimal weight);

        [OperationContract]
        IEnumerable<Product> GetProminentProducts();

        [OperationContract]
        ProductDetail GetProductDetail(Product product, ICollection<Option> selectectOptions);

        [OperationContract]
        ICollection<Option> GetProductDetailOptions(ProductDetail productDetail);
    }
}
